﻿<%@ Page Title="Customer Profile" Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true"
    CodeBehind="CustomerProfileEdit.aspx.cs" Inherits="VSM.CustomerProfileEdit" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <script type="text/javascript">
        function isNumberKey(sender, evt) {
            var txt = sender.value;
            var dotcontainer = txt.split('.');
            var charCode = (evt.which) ? evt.which : event.keyCode;
            if (!(dotcontainer.length == 1 && charCode == 46) && charCode > 31 && (charCode < 48 || charCode > 57))
                return false;
            return true;
        }
        function OpenProvince() {
            var url = "../../ProvincePopup.aspx";
            Main.openCustomDialog(url, 600, 610, "Province List");
        }
    </script>
    <div>
        <asp:UpdatePanel ID="updatePanel" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
                <asp:HiddenField ID="hdnCustomerCode" runat="server" />
                <div style="margin-left: 5px; width: 99%;">
                    <table border="0" width="100%" style="background-color: #D1D4D8;">
                        <tr>
                            <td style="background-color: #D1D4D8;">
                                <h2>Customer Detail</h2>
                            </td>
                            <td id="td_Notification" style="margin-right: 5px; width: 49%; text-align:right;background-color: #D1D4D8;" runat="server" >
                                <asp:Label ID="lblNotification" style="margin-right: 10px;" runat="server" ForeColor="Red" Text="Noted: You must finished all data for this customer before save it." />
                            </td>
                        </tr>
                    </table>
                </div>
                <div style="margin-left: 5px; width: 99%;">
                    <hr />
                    <table border="0" width="100%" style="background-color: #D1D4D8;">
                        <tr>
                            <td class="FormLineItemAlt" style="width: 150px">
                                <asp:Label ID="lblCustomerCode" runat="server" Text="Customer Code" />
                            </td>
                            <td class="FormLineItemAlt" valign="middle" style="width: 250px">
                                <asp:TextBox ID="txtCustomerCode" runat="server" Width="122px" BackColor="#E6E6E6"
                                    ReadOnly="True"></asp:TextBox>
                                <asp:Label ID="lblCustomerCodeRequired" runat="server" ForeColor="Red" Text="*"></asp:Label>
                                <asp:DropDownList ID="ddl_CustomerType" Width="40%" runat="server" 
                                    AutoPostBack="True" 
                                    onselectedindexchanged="ddl_CustomerType_SelectedIndexChanged">
                                    <asp:ListItem Value="C">Customer</asp:ListItem>
                                    <asp:ListItem Value="L">Lead</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td class="FormLineItemAlt" style="width: 110px">
                                <asp:Label ID="lblBPType" runat="server" Text="B.P. Type" />
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:DropDownList ID="ddlBPType" runat="server" Width="15%" AutoPostBack="True" OnSelectedIndexChanged="ddl_BPType_SelectedIndexChanged">
                                    <asp:ListItem Value="I">Private</asp:ListItem>
                                    <asp:ListItem Value="C">Company</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItem" valign="top">
                                <asp:Label ID="lblCustomerName" runat="server" Text="Customer Name" />
                            </td>
                            <td class="FormLineItem" valign="top">
                                <asp:TextBox ID="txtCustomerName" runat="server" TextMode="MultiLine" Height="45px"
                                    Width="300px" />
                            </td>
                            <td class="FormLineItem" valign="top">
                                <asp:Label ID="lblAddress" runat="server" Text="Address" />
                            </td>
                            <td class="FormLineItem">
                                <asp:TextBox ID="txtAddress" runat="server" TextMode="MultiLine" Height="45px" Width="300px" />
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblContactPerson" runat="server" Text="Contact Person" />
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:TextBox ID="txtCntctPrsn" runat="server" MaxLength="90" Width="98%"></asp:TextBox>
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblProvince" runat="server" Text="Province" />
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:TextBox ID="txtProvinceCode" runat="server" BackColor="#E6E6E6" 
                                    ReadOnly="True" style="width: 13%;"></asp:TextBox>
                                <asp:TextBox ID="txtProvinceName" runat="server" BackColor="#E6E6E6" ReadOnly="True" style="width: 35%;"></asp:TextBox>
                                <asp:Button ID="btnSelectProvince" runat="server" OnClientClick="OpenProvince(); return false;" 
                                    Style="background-image: url('/Images/bgButton.png'); background-repeat: no-repeat; font-weight: bold" Text="..." Width="22px" />
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItem">
                                <asp:Label ID="lblIncome" runat="server" Text="Income"></asp:Label>
                                <asp:Label ID="lblCompanyType" runat="server" Text="Company Type" Visible="False"></asp:Label>
                            </td>
                            <td class="FormLineItem">
                                <asp:TextBox ID="txtIncome" Style="text-align: right" OnKeyPress="return isNumberKey(this, event);"
                                    runat="server" Width="150px"></asp:TextBox>
                                <asp:DropDownList ID="ddl_CompanyType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddl_BPType_SelectedIndexChanged"
                                    Visible="False">
                                    <asp:ListItem Value="A">Private Company</asp:ListItem>
                                    <asp:ListItem Value="B">National Enterprise</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td class="FormLineItem">
                                <asp:Label ID="lblFax" runat="server" Text="Fax" />
                            </td>
                            <td class="FormLineItem">
                                <asp:TextBox ID="txtFax" runat="server" Text="" Width="150px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItemAlt" valign="top">
                                <asp:Label ID="lblAge" Text="Age" runat="server"></asp:Label>
                                <asp:Label ID="lblYoF" Visible="false" Text="Year Established" runat="server"></asp:Label>
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:TextBox ID="txtAge" Style="text-align: right" OnKeyPress="return isNumberKey(this, event);"
                                    runat="server" Width="80px"></asp:TextBox>
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblMaritalStatus" runat="server" Text="Marital Status"></asp:Label>
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:DropDownList ID="ddl_Marital" runat="server" AutoPostBack="True" OnSelectedIndexChanged="ddl_BPType_SelectedIndexChanged">
                                    <asp:ListItem Value="1">Single</asp:ListItem>
                                    <asp:ListItem Value="2">Married</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItem" valign="top">
                                <asp:Label ID="lblTaxCode" runat="server" Text="Tax Code" />
                            </td>
                            <td class="FormLineItem" valign="top">
                                <%--<asp:RequiredFieldValidator ID="rfvIDCard" runat="server" ControlToValidate="txtIDCard"
                                    Display="Dynamic" ErrorMessage="Please enter ID Card">*</asp:RequiredFieldValidator>--%>
                                <asp:TextBox ID="txtTaxCode" runat="server" Text="" Width="150px" AutoPostBack="true"
                                    ontextchanged="txtTaxCode_TextChanged"></asp:TextBox>
                                <asp:Label ID="lblTaxCodeRequired" runat="server" ForeColor="Red" Text="*" Visible="False"></asp:Label>
                            </td>
                            <td class="FormLineItem" valign="top">
                                <asp:Label ID="lblIDCard" runat="server" Text="ID. Card" />
                            </td>
                            <td class="FormLineItem">
                                <asp:TextBox ID="txtIDCard" runat="server" Width="150px" AutoPostBack="true"
                                    ontextchanged="txtIDCard_TextChanged"></asp:TextBox>
                                <asp:Label ID="lblIDCardRequired" runat="server" ForeColor="Red" Text="*" 
                                    Visible="False"></asp:Label>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItemAlt" valign="top">
                                <asp:Label ID="lblEmail" runat="server" Text="E-mail" />
                            </td>
                            <td class="FormLineItemAlt" valign="top">
                                <asp:TextBox ID="txtE_Mail" runat="server" Width="98%"></asp:TextBox>
                            </td>
                            <td class="FormLineItemAlt" valign="top">
                                <asp:Label ID="lblMemNumber" runat="server" Text="Members Number" />
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:TextBox ID="txtMembersNo" Style="text-align: right" OnKeyPress="return isNumberKey(this, event);"
                                    Text="" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItem" valign="top">
                                <asp:Label ID="lblTelephone" runat="server" Text="Telephone" />
                            </td>
                            <td class="FormLineItem" valign="top">
                                <asp:Label ID="lblHome" runat="server" Text="Home" />
                                <asp:TextBox ID="txtHomeTel" Width="110px" runat="server"></asp:TextBox>
                                &nbsp;&nbsp;&nbsp;<asp:Label ID="lblOffice" runat="server" Text="Office" />
                                <asp:TextBox ID="txtOfficeTel" Text="" Width="105px" runat="server"></asp:TextBox>
                            </td>
                            <td class="FormLineItem" valign="top">
                                <asp:Label ID="lblCellphone" runat="server" Text="Cellphone" />
                            </td>
                            <td class="FormLineItem">
                                <asp:TextBox ID="txtMobiphone" Text="" runat="server"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblPreparingbuy" runat="server" Text="Preparing buy" />
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:RadioButtonList ID="rbnPreparingBuy" runat="server" RepeatDirection="Horizontal"
                                    Width="300px">
                                    <asp:ListItem Selected="True" Value="0">First</asp:ListItem>
                                    <asp:ListItem Value="1">Replace One</asp:ListItem>
                                    <asp:ListItem Value="2">One More</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblGender" runat="server" Text="Gender"></asp:Label>
                            </td>
                            <td class="FormLineItemAlt">
                                <asp:RadioButtonList ID="rblGender" runat="server" RepeatDirection="Horizontal" Width="300px">
                                    <asp:ListItem Selected="True" Value="1">Male</asp:ListItem>
                                    <asp:ListItem Value="2">Female</asp:ListItem>
                                </asp:RadioButtonList>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItem">
                                <asp:Label ID="lblMitsOwned" runat="server" Text="Mitsubishi Owned" />
                            </td>
                            <td class="FormLineItem" valign="top" colspan="2">
                                <asp:Label ID="lblHowMany" runat="server" Text="How many" />
                                <asp:TextBox ID="txtMMCOwnedQty" Style="text-align: right" OnKeyPress="return isNumberKey(this, event);"
                                    runat="server" Text="" Width="50px"></asp:TextBox>
                                &nbsp;&nbsp;<asp:Label ID="lblWhatKindOf" runat="server" Text="What kind of" />
                                <asp:TextBox ID="txtMMCOwnedName" runat="server" Text="" Width="195px"></asp:TextBox>
                            </td>
                            <td class="FormLineItem">
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItemAlt">
                                <asp:Label ID="lblOtherCarsOwned" runat="server" Text="Other Cars Owned" />
                            </td>
                            <td class="FormLineItemAlt" valign="top" colspan="2">
                                <asp:Label ID="lblHowManyOther" runat="server" Text="How many" />
                                <asp:TextBox ID="txtOtherCarOwnedQty" Style="text-align: right" OnKeyPress="return isNumberKey(this, event);"
                                    runat="server" Text="" Width="50px"></asp:TextBox>
                                &nbsp;&nbsp;<asp:Label ID="lblWhatKindOfOther" runat="server" Text="What kind of" />
                                <asp:TextBox ID="txtOtherCarOwnedName" runat="server" Text="" Width="195px"></asp:TextBox>
                            </td>
                            <td class="FormLineItemAlt">
                                <table width="100%">
                                    <tr>
                                        <td style="width: 20%;">
                                            <asp:Label ID="lblSaleMan" runat="server" Text="Sale Man" />
                                        </td>
                                        <td style="width: 80%;">
                                            <asp:DropDownList ID="ddlSaleMan" runat="server" AutoPostBack="True">
                                            </asp:DropDownList>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItem">
                                <asp:Label ID="lblPurposeOfUsed" runat="server" Text="Purpose of used" />
                            </td>
                            <td class="FormLineItem" valign="top" >
                                <asp:Label ID="lblPrivate" runat="server" Text="Private" />
                                <asp:TextBox ID="txtPurposePrivate" Style="text-align: right" OnKeyPress="return isNumberKey(this, event);"
                                    runat="server" Text="" Width="50px"></asp:TextBox>% &nbsp;&nbsp;&nbsp;<asp:Label ID="lblCompany" runat="server" Text="Company" />
                                <asp:TextBox ID="txtPurposeCompany" Style="text-align: right" OnKeyPress="return isNumberKey(this, event);"
                                    runat="server" Text="" Width="50px"></asp:TextBox>%
                            </td>
                            <td class="FormLineItem">
                                <asp:Label ID="lblCustomerStatus" runat="server" Text="Customer Status" />
                            </td>
                            <td class="FormLineItem">
                                <asp:DropDownList ID="ddlCustomerStatus" runat="server" AutoPostBack="True" 
                                    OnSelectedIndexChanged="ddl_BPType_SelectedIndexChanged">
                                    <asp:ListItem>Contact</asp:ListItem>
                                    <asp:ListItem>Test Drive</asp:ListItem>
                                    <asp:ListItem>Prepare sign contract</asp:ListItem>
                                    <asp:ListItem>Stop</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td class="FormLineItemAlt" valign="top">
                                <asp:Label ID="lblRemark" runat="server" Text="Remark" />
                            </td>
                            <td class="FormLineItemAlt" colspan="3" valign="top">
                                <asp:TextBox ID="txtRemark" runat="server" TextMode="MultiLine" Width="100%"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <cc1:TabContainer ID="TabContainer1" runat="server" Width="100%" 
                                    ActiveTabIndex="0">
                                    <cc1:TabPanel ID="tabKnowledge" runat="server">
                                        <HeaderTemplate>
                                            Knowledge Mitsubishi By</HeaderTemplate>
                                        <ContentTemplate>
                                            <asp:GridView ID="grvA" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                                                BackColor="White" BorderColor="White" CellPadding="2" CellSpacing="2" CssClass="GridInner"
                                                PageSize="20" Width="100%">
                                                <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                                                <Columns>
                                                    <asp:TemplateField HeaderText="#">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblNo" runat="server" Text='<%# Bind("No") %>' BorderStyle="none">
                                                            </asp:Label></ItemTemplate>
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Description">
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblName" runat="server" Text='<%# Bind("Name") %>'></asp:Label><asp:HiddenField
                                                                ID="hdnInternalID" runat="server" Value='<%# Bind("internal_id") %>'></asp:HiddenField>
                                                            <asp:HiddenField ID="hdnCode" runat="server" Value='<%# Bind("Code") %>'></asp:HiddenField>
                                                            <asp:HiddenField ID="hdnCardCode" runat="server" Value='<%# Bind("CardCode") %>'>
                                                            </asp:HiddenField>
                                                        </ItemTemplate>
                                                        <HeaderStyle Font-Bold="True" VerticalAlign="Middle" />
                                                        <ItemStyle HorizontalAlign="Left" Width="90%" />
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Selection">
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chkASelection" runat="server" Checked='<%#Convert.ToBoolean(Eval("Selected")) %>'
                                                                OnCheckedChanged="chkASelection_CheckedChanged" AutoPostBack="true" /></ItemTemplate>
                                                        <HeaderStyle Font-Bold="True" VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                    </asp:TemplateField>
                                                </Columns>
                                                <EmptyDataTemplate>
                                                    <table border="1" cellpadding="2" cellspacing="2" class="GridInner" rules="all" style="width: 100%;
                                                        border-color: White;">
                                                        <tr style="height: 27px; color: white; font-weight: bold; text-decoration: none;
                                                            background-color: rgb(96, 149, 201);" valign="middle">
                                                            <th>
                                                                <span>#</span>
                                                            </th>
                                                            <th>
                                                                <span>Description</span>
                                                            </th>
                                                            <th>
                                                                <span>Selection</span>
                                                            </th>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="3">
                                                                <span>No Data</span>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </EmptyDataTemplate>
                                                <HeaderStyle BackColor="#6095C9" Font-Bold="True" Font-Overline="False" ForeColor="White"
                                                    Height="27px" VerticalAlign="Bottom" />
                                                <PagerSettings Mode="NumericFirstLast" />
                                                <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                                            </asp:GridView>
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                    <cc1:TabPanel ID="tabMitCar" runat="server">
                                        <HeaderTemplate>
                                            Mitsubishi car want to choose</HeaderTemplate>
                                        <ContentTemplate>
                                            <asp:GridView ID="grvB" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                                                BackColor="White" BorderColor="White" CellPadding="2" CellSpacing="2" CssClass="GridInner"
                                                PageSize="20" Width="100%">
                                                <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                                                <Columns>
                                                    <asp:TemplateField HeaderText="#">
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblNo" runat="server" Text='<%# Bind("No") %>' BorderStyle="none">
                                                            </asp:Label></ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Description">
                                                        <HeaderStyle Font-Bold="True" VerticalAlign="Middle" />
                                                        <ItemStyle HorizontalAlign="Left" Width="90%" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblName" runat="server" Text='<%# Bind("Name") %>'></asp:Label><asp:HiddenField
                                                                ID="hdnInternalID" runat="server" Value='<%# Bind("internal_id") %>'></asp:HiddenField>
                                                            <asp:HiddenField ID="hdnCode" runat="server" Value='<%# Bind("Code") %>'></asp:HiddenField>
                                                            <asp:HiddenField ID="hdnCardCode" runat="server" Value='<%# Bind("CardCode") %>'>
                                                            </asp:HiddenField>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Selection">
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chkBSelection" runat="server" Checked='<%#Convert.ToBoolean(Eval("Selected")) %>'
                                                                OnCheckedChanged="chkBSelection_CheckedChanged" AutoPostBack="true" /></ItemTemplate>
                                                        <HeaderStyle Font-Bold="True" VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                    </asp:TemplateField>
                                                </Columns>
                                                <EmptyDataTemplate>
                                                    <table border="1" cellpadding="2" cellspacing="2" class="GridInner" rules="all" style="width: 100%;
                                                        border-color: White;">
                                                        <tr style="height: 27px; color: white; font-weight: bold; text-decoration: none;
                                                            background-color: rgb(96, 149, 201);" valign="middle">
                                                            <th>
                                                                <span>#</span>
                                                            </th>
                                                            <th>
                                                                <span>Description</span>
                                                            </th>
                                                            <th>
                                                                <span>Selection</span>
                                                            </th>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="3">
                                                                <span>No Data</span>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </EmptyDataTemplate>
                                                <HeaderStyle BackColor="#6095C9" Font-Bold="True" Font-Overline="False" ForeColor="White"
                                                    Height="27px" VerticalAlign="Bottom" />
                                                <PagerSettings Mode="NumericFirstLast" />
                                                <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                                            </asp:GridView>
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                    <cc1:TabPanel ID="tabReason" runat="server">
                                        <HeaderTemplate>
                                            Reason Choose Mitsubishi</HeaderTemplate>
                                        <ContentTemplate>
                                            <asp:GridView ID="grvC" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                                                BackColor="White" BorderColor="White" CellPadding="2" CellSpacing="2" CssClass="GridInner"
                                                PageSize="20" Width="100%">
                                                <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                                                <Columns>
                                                    <asp:TemplateField HeaderText="#">
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblNo" runat="server" Text='<%# Bind("No") %>' BorderStyle="none">
                                                            </asp:Label></ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Description">
                                                        <HeaderStyle Font-Bold="True" VerticalAlign="Middle" />
                                                        <ItemStyle HorizontalAlign="Left" Width="90%" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblName" runat="server" Text='<%# Bind("Name") %>'></asp:Label><asp:HiddenField
                                                                ID="hdnInternalID" runat="server" Value='<%# Bind("internal_id") %>'></asp:HiddenField>
                                                            <asp:HiddenField ID="hdnCode" runat="server" Value='<%# Bind("Code") %>'></asp:HiddenField>
                                                            <asp:HiddenField ID="hdnCardCode" runat="server" Value='<%# Bind("CardCode") %>'>
                                                            </asp:HiddenField>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Selection">
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chkCSelection" runat="server" Checked='<%#Convert.ToBoolean(Eval("Selected")) %>'
                                                                OnCheckedChanged="chkCSelection_CheckedChanged" AutoPostBack="true" /></ItemTemplate>
                                                        <HeaderStyle Font-Bold="True" VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                    </asp:TemplateField>
                                                </Columns>
                                                <EmptyDataTemplate>
                                                    <table border="1" cellpadding="2" cellspacing="2" class="GridInner" rules="all" style="width: 100%;
                                                        border-color: White;">
                                                        <tr style="height: 27px; color: white; font-weight: bold; text-decoration: none;
                                                            background-color: rgb(96, 149, 201);" valign="middle">
                                                            <th>
                                                                <span>#</span>
                                                            </th>
                                                            <th>
                                                                <span>Description</span>
                                                            </th>
                                                            <th>
                                                                <span>Selection</span>
                                                            </th>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="3">
                                                                <span>No Data</span>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </EmptyDataTemplate>
                                                <HeaderStyle BackColor="#6095C9" Font-Bold="True" Font-Overline="False" ForeColor="White"
                                                    Height="27px" VerticalAlign="Bottom" />
                                                <PagerSettings Mode="NumericFirstLast" />
                                                <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                                            </asp:GridView>
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                    <cc1:TabPanel ID="tabResult" runat="server">
                                        <HeaderTemplate>
                                            Result</HeaderTemplate>
                                        <ContentTemplate>
                                            <table border="0" width="100%" style="background-color: #D1D4D8;">
                                                <tr>
                                                    <td class="FormLineItemAlt" style="width: 15%;">
                                                        <asp:Label ID="lblCarType" runat="server" Text="Car Type" />
                                                    </td>
                                                    <td class="FormLineItemAlt" style="width: 35%;">
                                                        <asp:DropDownList ID="ddlCarType" Width="60%" runat="server">
                                                        </asp:DropDownList>
                                                    </td>
                                                    <td class="FormLineItemAlt" style="width: 15%;">
                                                        <asp:Label ID="lblPaymentMethod" runat="server" Text="Payment Method" />
                                                    </td>
                                                    <td class="FormLineItemAlt" style="width: 35%;">
                                                        <asp:TextBox ID="txtPaymentMethod" Text="" Width="98%" runat="server"></asp:TextBox>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td class="FormLineItem" style="width: 15%;">
                                                        <asp:Label ID="lblBankName" runat="server" Text="Bank Name" />
                                                    </td>
                                                    <td class="FormLineItem" style="width: 35%;">
                                                        <asp:TextBox ID="txtBankName" Text="" Width="98%" runat="server" />
                                                    </td>
                                                    <td class="FormLineItem" colspan="2" style="width: 50%;">
                                                    </td>
                                                </tr>
                                            </table>
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                    <cc1:TabPanel ID="tabKindofInsurance" runat="server">
                                        <HeaderTemplate>
                                            What kind of Insurance</HeaderTemplate>
                                        <ContentTemplate>
                                            <asp:GridView ID="grvE" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                                                BackColor="White" BorderColor="White" CellPadding="2" CellSpacing="2" CssClass="GridInner"
                                                PageSize="20" Width="100%">
                                                <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                                                <Columns>
                                                    <asp:TemplateField HeaderText="#">
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblNo" runat="server" Text='<%# Bind("No") %>' BorderStyle="none">
                                                            </asp:Label></ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Description">
                                                        <HeaderStyle Font-Bold="True" VerticalAlign="Middle" />
                                                        <ItemStyle HorizontalAlign="Left" Width="90%" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblName" runat="server" Text='<%# Bind("Name") %>'></asp:Label><asp:HiddenField
                                                                ID="hdnInternalID" runat="server" Value='<%# Bind("internal_id") %>'></asp:HiddenField>
                                                            <asp:HiddenField ID="hdnCode" runat="server" Value='<%# Bind("Code") %>'></asp:HiddenField>
                                                            <asp:HiddenField ID="hdnCardCode" runat="server" Value='<%# Bind("CardCode") %>'>
                                                            </asp:HiddenField>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Selection">
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chkESelection" runat="server" Checked='<%#Convert.ToBoolean(Eval("Selected")) %>'
                                                                OnCheckedChanged="chkESelection_CheckedChanged" AutoPostBack="true" /></ItemTemplate>
                                                        <HeaderStyle Font-Bold="True" VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                    </asp:TemplateField>
                                                </Columns>
                                                <EmptyDataTemplate>
                                                    <table border="1" cellpadding="2" cellspacing="2" class="GridInner" rules="all" style="width: 100%;
                                                        border-color: White;">
                                                        <tr style="height: 27px; color: white; font-weight: bold; text-decoration: none;
                                                            background-color: rgb(96, 149, 201);" valign="middle">
                                                            <th>
                                                                <span>#</span>
                                                            </th>
                                                            <th>
                                                                <span>Description</span>
                                                            </th>
                                                            <th>
                                                                <span>Selection</span>
                                                            </th>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="3">
                                                                <span>No Data</span>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </EmptyDataTemplate>
                                                <HeaderStyle BackColor="#6095C9" Font-Bold="True" Font-Overline="False" ForeColor="White"
                                                    Height="27px" VerticalAlign="Bottom" />
                                                <PagerSettings Mode="NumericFirstLast" />
                                                <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                                            </asp:GridView>
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                    <cc1:TabPanel ID="tabAccessories" runat="server">
                                        <HeaderTemplate>
                                            What about accessory</HeaderTemplate>
                                        <ContentTemplate>
                                            <asp:GridView ID="grvF" runat="server" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"
                                                BackColor="White" BorderColor="White" CellPadding="2" CellSpacing="2" CssClass="GridInner"
                                                PageSize="20" Width="100%">
                                                <AlternatingRowStyle BackColor="#EEF1F7" BorderColor="White" BorderWidth="2px" />
                                                <Columns>
                                                    <asp:TemplateField HeaderText="#">
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                        <HeaderStyle VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblNo" runat="server" Text='<%# Bind("No") %>' BorderStyle="none">
                                                            </asp:Label></ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Description">
                                                        <HeaderStyle Font-Bold="True" VerticalAlign="Middle" />
                                                        <ItemStyle HorizontalAlign="Left" Width="90%" />
                                                        <ItemTemplate>
                                                            <asp:Label ID="lblName" runat="server" Text='<%# Bind("Name") %>'></asp:Label><asp:HiddenField
                                                                ID="hdnInternalID" runat="server" Value='<%# Bind("internal_id") %>'></asp:HiddenField>
                                                            <asp:HiddenField ID="hdnCode" runat="server" Value='<%# Bind("Code") %>'></asp:HiddenField>
                                                            <asp:HiddenField ID="hdnCardCode" runat="server" Value='<%# Bind("CardCode") %>'>
                                                            </asp:HiddenField>
                                                        </ItemTemplate>
                                                    </asp:TemplateField>
                                                    <asp:TemplateField HeaderText="Selection">
                                                        <ItemTemplate>
                                                            <asp:CheckBox ID="chkFSelection" runat="server" Checked='<%#Convert.ToBoolean(Eval("Selected")) %>'
                                                                OnCheckedChanged="chkFSelection_CheckedChanged" AutoPostBack="true" /></ItemTemplate>
                                                        <HeaderStyle Font-Bold="True" VerticalAlign="Middle" HorizontalAlign="Center" />
                                                        <ItemStyle HorizontalAlign="Center" Width="5%" />
                                                    </asp:TemplateField>
                                                </Columns>
                                                <EmptyDataTemplate>
                                                    <table border="1" cellpadding="2" cellspacing="2" class="GridInner" rules="all" style="width: 100%;
                                                        border-color: White;">
                                                        <tr style="height: 27px; color: white; font-weight: bold; text-decoration: none;
                                                            background-color: rgb(96, 149, 201);" valign="middle">
                                                            <th>
                                                                <span>#</span>
                                                            </th>
                                                            <th>
                                                                <span>Description</span>
                                                            </th>
                                                            <th>
                                                                <span>Selection</span>
                                                            </th>
                                                        </tr>
                                                        <tr>
                                                            <td colspan="3">
                                                                <span>No Data</span>
                                                            </td>
                                                        </tr>
                                                    </table>
                                                </EmptyDataTemplate>
                                                <HeaderStyle BackColor="#6095C9" Font-Bold="True" Font-Overline="False" ForeColor="White"
                                                    Height="27px" VerticalAlign="Bottom" />
                                                <PagerSettings Mode="NumericFirstLast" />
                                                <PagerStyle BackColor="#70A0D0" Font-Bold="True" HorizontalAlign="Center" VerticalAlign="Middle" />
                                                <RowStyle BackColor="#D9E0ED" BorderColor="White" BorderWidth="2px" Height="25px" />
                                            </asp:GridView>
                                        </ContentTemplate>
                                    </cc1:TabPanel>
                                </cc1:TabContainer>
                            </td>
                        </tr>
                    </table>
                </div>
                <table width="100%" border="0">
                    <tr>
                        <td>
                            <table style="width: 100%">
                                <tr>
                                    <td style="width: 220px;">
                                        <asp:Button ID="btnUpdate" runat="server" Width="120px" Text="Add Customer" OnClick="btnUpdate_Click"
                                            Style="background-image: url('/Images/bgButton.png'); background-repeat: no-repeat;
                                            color: White;" BorderStyle="Solid" />
                                    </td>
                                    <td>
                                        <asp:Label ID="lblError" runat="server" Visible="False" Font-Bold="True" ForeColor="Red"></asp:Label>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </ContentTemplate>
<%--            <Triggers>
                <asp:PostBackTrigger  ControlID="TabContainer1" />
            </Triggers>--%>
        </asp:UpdatePanel>
    </div>
</asp:Content>
